********************************************************************************
*                                                                              *
*   Reproduction do file for 							   				       *
*      Author  : Ha, Hyunsoo and Park, Jaesuk                    	           *
*      Title   : Coercive Origin of Banking Giants                             *
*                                                                              *
*   Table of Contents                                                          *
*                                                                              *
*       0. General Instructions                                                *
*                                                                              *
*       I.  Main Manuscript: Main Tables                                       *
*          ——————————————————————————————————————————————————————————————————  *      
*           Table 1.     Effects of Sanctions on Bank Competition              *
*           Table 2.     Overview of Robustness Tests: Pre-1996 Excluded       *
*           Table 3.     Overview of Robustness Tests: Pre-1996 Included       *
*          ——————————————————————————————————————————————————————————————————  *      
*                                                                              *
*      II.  Main Manuscript: Figures                                           *
*          ——————————————————————————————————————————————————————————————————  *      
*           Figure 1a.   Unobserved Pre-1996 Trend                             *
*           Figure 1b.   Inclusion of Long-lasting Sanctions                   *
*           Figure 2.    The Lerner Index of the Iranian Banking Industry      *
*          ——————————————————————————————————————————————————————————————————  *      
*                                                                              *
*     III.  Online Appendix: Summary Statistics and Robustness Tests           *
*           —————————————————————————————————————————————————————————————————  *
*                          (1)          (2)            (3)            (4)      *
*                        Pre-1996      Sample    Indep. Variable   Estimation  *
*           —————————————————————————————————————————————————————————————————  *  
*           Appx. 3.     Escluded    Summary Statistics                        *
*           Appx. 4.     Excluded    Full            None           OLS        *
*           Appx. 5.     Excluded    Full            Duration       OLS        *
*           Appx. 6.     Excluded    Full            Dummy          OLS        *
*           Appx. 7.     Excluded    Sanc. States    Duration       Heckman    *
*           Appx. 8.     Excluded    1-Year Lag      Duration       OLS        *
*           Appx. 9.     Excluded    Diff: 5-7 Yr    Duration       OLS        *
*           Appx. 10.    Excluded    Diff: 6-8 Yr    Duration       OLS        *
*           Appx. 11.    Excluded    Diff: 7-9 Yr    Duration       OLS        *
*           Appx. 12.    Included    Summary Statistics                        * 
*           Appx. 13.    Included    Full            Duration       OLS        *
*           Appx. 14.    Included    Full            None           OLS        *
*           Appx. 15.    Included    Full            Duration       OLS        *
*           Appx. 16.    Included    Full            Dummy          OLS        *
*           Appx. 17.    Included    Sanc. States    Duration       Heckman    *
*           Appx. 18.    Included    1-Year Lag      Duration       OLS        *
*           Appx. 19.    Included    Diff: 5-7 Yr    Duration       OLS        *
*           Appx. 20.    Included    Diff: 6-8 Yr    Duration       OLS        *
*           Appx. 21.    Included    Diff: 7-9 Yr    Duration       OLS        *
*           —————————————————————————————————————————————————————————————————  *  
*                                                                              *
********************************************************************************


********************************************************************************
*** 0. General Instructions ****************************************************
********************************************************************************
 
  * (1) STATA Version Requirement
  *     The code in this replication do-file was written and tested in 
  *     STATA 19. Users are strongly encouraged to run the replication 
  *     using STATA 19 to ensure full compatibility and intended 
  *     functionality.
  
  * (2) Required Packages for Download
  *     The replication code uses several user-written packages that must be 
  *     installed before running the analyses. You can install all required 
  *     packages by running the commands below:
 
        ssc install outreg2, replace
        ssc install estout, replace
        ssc install fitstat, replace
        ssc install ftools, replace
        ssc install reghdfe, replace
        ssc install asdoc, replace
        ssc install distinct, replace
        ssc install rangestat, replace

  * (3) Notes on Running the Code
  *     There are two ways to run the replication files:
  *
  *     i. To replicate all tables and figures, simply run the entire 
  *        do-file from start to finish in one run.
  *
  *     ii. To replicate a specific table or figure, navigate to the 
  *         relevant section (e.g., "Table 1" or "Appendix 13") and 
  *         run that block along with the preparatory steps listed 
  *         at the beginning of each section.		
		
		
********************************************************************************
*** I. Main Manuscript: Main Tables ********************************************
********************************************************************************		
		
** Table 1. Effects of Sanctions on Bank Competition ***************************	
		
  * Preparatory Steps (1): Basic setup
    clear all
    program drop _all
    set more off
    set mem 600m

  * Preparatory Steps (2): Import data
	use "[Data] Pre-1996 Excluded.dta", replace	
	
  * Preparatory Steps (3): Declare panel 
    encode iso3, gen(iso3_num)
    xtset iso3_num year
	
  * Preparatory Steps (4): Run regression with minimum size sample
	reghdfe lerner sanc_fdur sanc_fpostdur sanc_nonfdur sanc_nonfpostdur ///
	     sanc_type sanc_state sanc_org ///
		 econ_change_gdp econ_fin econ_asset_gdp, ///
		 absorb(iso3_num year) vce(robust)
		 
  * Preparatory Steps (5): Specify the minimum size sample
    gen analysis_sample1 = e(sample)

  * Preparatory Steps (6): Restrict to minimum size sample
    keep if analysis_sample1	
		
  * Model (1)
	reghdfe lerner sanc_dur sanc_postdur ///
	     sanc_type sanc_state sanc_org, ///
		 absorb(iso3_num year) vce(robust)
	est store full_dur_ols_1

  * Model (2)	
	reghdfe lerner sanc_dur sanc_postdur  ///
	     sanc_type sanc_state sanc_org ///
		 econ_change_gdp econ_fin econ_asset_gdp, ///
		 absorb(iso3_num year) vce(robust)
	est store full_dur_ols_2

  * Model (3)	
	reghdfe lerner sanc_fdur sanc_fpostdur sanc_nonfdur sanc_nonfpostdur ///
	     sanc_type sanc_state sanc_org, ///
		 absorb(iso3_num year) vce(robust)	
    est store full_dur_ols_3

  * Model (4)	
	reghdfe lerner sanc_fdur sanc_fpostdur sanc_nonfdur sanc_nonfpostdur ///
	     sanc_type sanc_state sanc_org ///
		 econ_change_gdp econ_fin econ_asset_gdp, ///
		 absorb(iso3_num year) vce(robust)
	est store full_dur_ols_4
	
  * Export regression table
    esttab full_dur_ols_1  full_dur_ols_2  ///
	       full_dur_ols_3  full_dur_ols_4  ///
	       using "[Table 1] full_dur_ols.rtf", ///
	       b(3) se(3) ///
	       scalars(r2_a) ///
		   star(* 0.1 ** 0.05 *** 0.01) ///		  
           nomtitles nobaselevels nogaps  ///
           varwidth(15) modelwidth(10) ///
		   order(sanc_dur sanc_postdur ///
		         sanc_fdur sanc_fpostdur ///
				 sanc_nonfdur sanc_nonfpostdur ///
  	             sanc_type sanc_state sanc_org ///
		         econ_change_gdp econ_fin econ_asset_gdp) replace  		
			
			
** Table 2. Overview of Robustness Tests: Pre-1996 Excluded ********************	
		
  *  Table 2 in the main manuscript is a "manually compiled" summary table
  *  that reports selected coefficient estimates for key independent 
  *  variables from the robustness tests. 
  *
  *  All underlying regression models are fully reproduced in Appendix 
  *  5–11 using the code in this do-file. Users can verify coefficients 
  *  reported in Table 2 by consulting the corresponding appendix output.
  *  The mapping between Table 2 and the appendix tables is summarized below:
  *  
  *  ——————————————————————————————————————————————————————————————————————— 
  *                                                 (1)           (2)
  *                                               Appx No.      Model No.
  *  ——————————————————————————————————————————————————————————————————————— 
  *   R1: Alternative Control (GDPPC)                5            1, 3
  *   R2: Alternative Control (Total GDP)            5            2, 4
  *   R3: Imposition Dummy                           6            2, 4
  *   R4: Heckman Selection Model                    7            2, 4
  *   R5: 1-Year Lagged Variables                    8            2, 4
  *   R6: Long-run Avg. Change (5-7 Yr)              9            2, 4
  *   R7: Long-run Avg. Change (6-8 Yr)              10           2, 4
  *   R8: Long-run Avg. Change (7-9 Yr)              11           2, 4
  *  ———————————————————————————————————————————————————————————————————————
		
		
** Table 3. Overview of Robustness Tests: Pre-1996 Included ********************	
		
  *  Table 3 in the main manuscript is a "manually compiled" summary table
  *  that reports selected coefficient estimates for key independent 
  *  variables from the robustness tests. 
  *
  *  All underlying regression models are fully reproduced in Appendix 
  *  13, 15–21 using the code in this do-file. Users can verify coefficients 
  *  reported in Table 3 by consulting the corresponding appendix output.
  *  The mapping between Table 3 and the appendix tables is summarized below:
  *  
  *  ——————————————————————————————————————————————————————————————————————— 
  *                                                 (1)           (2)
  *                                               Appx No.      Model No.
  *  ——————————————————————————————————————————————————————————————————————— 
  *   Main Estimation                                13           2, 4
  *   R1: Alternative Control (GDPPC)                15           1, 3
  *   R2: Alternative Control (Total GDP)            15           2, 4
  *   R3: Imposition Dummy                           16           2, 4
  *   R4: Heckman Selection Model                    17           2, 4
  *   R5: 1-Year Lagged Variables                    18           2, 4
  *   R6: Long-run Avg. Change (5-7 Yr)              19           2, 4
  *   R7: Long-run Avg. Change (6-8 Yr)              20           2, 4
  *   R8: Long-run Avg. Change (7-9 Yr)              21           2, 4
  *  ———————————————————————————————————————————————————————————————————————
				
		
********************************************************************************
*** II. Main Manuscript: Figures ***********************************************
********************************************************************************			
		
** Figure 1a. Unobserved Pre-1996 Trend ****************************************

  *  Figure 1a is a conceptual illustration created in LaTeX, not an empirical
  *  graph. As such, there is no corresponding Stata code for replication. 

  
** Figure 1b. Inclusion of Long-lasting Sanctions ******************************
		
  * Preparatory Steps (1): Basic setup
    clear all
    program drop _all
    set more off
    set mem 600m

  * Preparatory Steps (2): Import data
	use "[Data] Pre-1996 Included.dta", replace	
	
  * Preparatory Steps (3): Declare panel 
    encode iso3, gen(iso3_num)
    xtset iso3_num year
	
  * Preparatory Steps (4): Run regression with minimum size sample
	reghdfe lerner sanc_fdur sanc_fpostdur sanc_nonfdur sanc_nonfpostdur ///
	     sanc_type sanc_state sanc_org ///
		 econ_change_gdp econ_fin econ_asset_gdp, ///
		 absorb(iso3_num year) vce(robust)
		 
  * Preparatory Steps (5): Specify the minimum size sample
    gen analysis_sample1 = e(sample)

  * Preparatory Steps (6): Restrict to minimum size sample
    keep if analysis_sample1	

  * Preparatory Steps (7): Graph setting
    graph set window fontface "Helvetica"

  * Figure 1b		
    histogram sanc_dur if sanc_dur > 19, frequency ///
       width(1) ///
       start(20) ///
       color(gs13) ///
       lcolor(gs8) ///
       title("") ///
       xtitle("Sanctions Duration: All Sanctions", size(small) margin(t+2)) ///
       ytitle("Frequency", size(small) margin(t+4)) ///
       ylabel(2(2)10, nogrid notick labsize(small)) ///
       xlabel(, nogrid notick labsize(small)) ///
       xscale(range(20 65)) ///
       graphregion(color(white)) ///
       aspectratio(1) ///
       plotregion(margin(0 0 0 0)) ///
       legend(off)


** Figure 2. The Lerner Index of the Iranian Banking Industry ******************
	
  * Preparatory Steps (1): Basic setup
    clear all
    program drop _all
    set more off
    set mem 600m

  * Preparatory Steps (2): Import data
	use "[Data] Pre-1996 Included.dta", replace			
		
  * Preparatory Steps (3): Graph setting
    graph set window fontface "Helvetica"		
		
  * Figure 2	
	twoway (line lerner year if iso3 == "IRN" & inrange(year, 2000, 2010), ///
            lcolor(black) lwidth(medthin)), ///
			xline(2001, lpattern(dash) lcolor(black)) ///
			title("") ///
			xtitle("Year", size(small) margin(t+2)) ///
			ytitle("Lerner Index", size(small) margin(t+6)) ///
			xlabel(2001 2003 2005 2007 2009, labsize(small) nogrid notick) ///
			ylabel(0.1(0.1)0.6, labsize(small) nogrid notick) ///
			xscale(range(2000 2010)) ///
			graphregion(color(white)) ///
			aspectratio(1) ///
			plotregion(margin(0 0 0 0)) ///
			legend(off)		

			
********************************************************************************				
* III. Online Appendix: Summary Statistics and Robustness Tests ****************	
********************************************************************************			
			
** Appx. 3. Pre-1996: Excluded / Summary Statistics ****************************

  * Preparatory Steps (1): Basic setup
    clear all
    program drop _all
    set more off
    set mem 600m

  * Preparatory Steps (2): Import data
	use "[Data] Pre-1996 Excluded.dta", replace	
	
  * Preparatory Steps (3): Declare panel 
    encode iso3, gen(iso3_num)
    xtset iso3_num year
	
  * Preparatory Steps (4): Run regression with minimum size sample
	reghdfe lerner sanc_fdur sanc_fpostdur sanc_nonfdur sanc_nonfpostdur ///
	     sanc_type sanc_state sanc_org ///
		 econ_change_gdp econ_fin econ_asset_gdp, ///
		 absorb(iso3_num year) vce(robust)
		 
  * Preparatory Steps (5): Specify the minimum size sample
    gen analysis_sample1 = e(sample)

  * Preparatory Steps (6): Restrict to minimum size sample
    keep if analysis_sample1	
	
  *	Appx. 3. Summary Statistics
    asdoc sum lerner ///
	          sanc_dur sanc_postdur sanc_dur_dummy ///
			  sanc_fdur sanc_fpostdur sanc_fdur_dummy ///
			  sanc_nonfdur sanc_nonfpostdur sanc_nonfdur_dummy ///
			  sanc_type sanc_state sanc_org ///
			  econ_change_gdp econ_lgdppc econ_lgdp econ_fin econ_asset_gdp ///
			  pol_polity2dem ///
			  econ_fdi_gdp econ_trade_gdp, ///
			  save([Appendix 3] Summary Statistics.doc) replace	
	

** Appx. 4. Pre-1996: Excluded / Sample: Full / IV: None / OLS *****************

  * Preparatory Steps (1): Basic setup
    clear all
    program drop _all
    set more off
    set mem 600m

  * Preparatory Steps (2): Import data
	use "[Data] Pre-1996 Excluded.dta", replace	
	
  * Preparatory Steps (3): Declare panel 
    encode iso3, gen(iso3_num)
    xtset iso3_num year
	
  * Preparatory Steps (4): Run regression with minimum size sample
	reghdfe lerner sanc_fdur sanc_fpostdur sanc_nonfdur sanc_nonfpostdur ///
	     sanc_type sanc_state sanc_org ///
		 econ_change_gdp econ_fin econ_asset_gdp, ///
		 absorb(iso3_num year) vce(robust)
		 
  * Preparatory Steps (5): Specify the minimum size sample
    gen analysis_sample1 = e(sample)

  * Preparatory Steps (6): Restrict to minimum size sample
    keep if analysis_sample1	
	
  * Model (1)
	reghdfe lerner ///
	     sanc_type sanc_state sanc_org, ///
		 absorb(iso3_num year) vce(robust)
	est store full_no_ols_1

  * Model (2)	
	reghdfe lerner ///
	     sanc_type sanc_state sanc_org ///
		 econ_change_gdp econ_fin econ_asset_gdp, ///
		 absorb(iso3_num year) vce(robust)
	est store full_no_ols_2

  * Model (3)	
	reghdfe lerner ///
	     sanc_type sanc_state sanc_org, ///
		 absorb(iso3_num year) vce(robust)	
    est store full_no_ols_3

  * Model (4)
	reghdfe lerner ///
	     sanc_type sanc_state sanc_org ///
		 econ_change_gdp econ_fin econ_asset_gdp, ///
		 absorb(iso3_num year) vce(robust)
	est store full_no_ols_4 
	
  * Export regression table
    esttab full_no_ols_1  full_no_ols_2  ///
	       full_no_ols_3  full_no_ols_4  ///
	       using "[Appendix 4] full_no_ols.rtf", ///
	       b(3) se(3) ///
	       scalars(r2_a) ///
		   star(* 0.1 ** 0.05 *** 0.01) ///		  
           nomtitles nobaselevels nogaps  ///
           varwidth(15) modelwidth(10) ///
		   order(sanc_type sanc_state sanc_org ///
		         econ_change_gdp econ_fin econ_asset_gdp) replace	

	
** Appx. 5. Pre-1996: Excluded / Sample: Full / IV: Duration / OLS *************

  * Preparatory Steps (1): Basic setup
    clear all
    program drop _all
    set more off
    set mem 600m

  * Preparatory Steps (2): Import data
	use "[Data] Pre-1996 Excluded.dta", replace	
	
  * Preparatory Steps (3): Declare panel 
    encode iso3, gen(iso3_num)
    xtset iso3_num year
	
  * Preparatory Steps (4): Run regression with minimum size sample
	reghdfe lerner sanc_fdur sanc_fpostdur sanc_nonfdur sanc_nonfpostdur ///
	     sanc_type sanc_state sanc_org ///
		 econ_change_gdp econ_fin econ_asset_gdp, ///
		 absorb(iso3_num year) vce(robust)
		 
  * Preparatory Steps (5): Specify the minimum size sample
    gen analysis_sample1 = e(sample)

  * Preparatory Steps (6): Restrict to minimum size sample
    keep if analysis_sample1	

  * Model (1)
	reghdfe lerner sanc_dur sanc_postdur  ///
	     sanc_type sanc_state sanc_org ///
		 econ_lgdppc econ_fin econ_asset_gdp, ///
		 absorb(iso3_num year) vce(robust)
	est store full_dur_ols_gdppc_1

  * Model (2)	
	reghdfe lerner sanc_dur sanc_postdur  ///
	     sanc_type sanc_state sanc_org ///
		 econ_lgdp econ_fin econ_asset_gdp, ///
		 absorb(iso3_num year) vce(robust)
	est store full_dur_ols_lgdp_1	

  * Model (3)	
	reghdfe lerner sanc_fdur sanc_fpostdur sanc_nonfdur sanc_nonfpostdur ///
	     sanc_type sanc_state sanc_org ///
		 econ_lgdppc econ_fin econ_asset_gdp, ///
		 absorb(iso3_num year) vce(robust)
	est store full_dur_ols_gdppc_2

  * Model (4)	
	reghdfe lerner sanc_fdur sanc_fpostdur sanc_nonfdur sanc_nonfpostdur ///
	     sanc_type sanc_state sanc_org ///
		 econ_lgdp econ_fin econ_asset_gdp, ///
		 absorb(iso3_num year) vce(robust)
	est store full_dur_ols_lgdp_2
	
  * Export regression table
    esttab full_dur_ols_gdppc_1 full_dur_ols_lgdp_1  ///
	       full_dur_ols_gdppc_2 full_dur_ols_lgdp_2 ///
	       using "[Appendix 5] full_dur_ols_lgdppc_lgdp.rtf", ///
	       b(3) se(3) ///
	       scalars(r2_a) ///
		   star(* 0.1 ** 0.05 *** 0.01) ///		  
           nomtitles nobaselevels nogaps  ///
           varwidth(15) modelwidth(10) ///
		   order(sanc_dur sanc_postdur ///
		         sanc_fdur sanc_fpostdur ///
				 sanc_nonfdur sanc_nonfpostdur ///
  	             sanc_type sanc_state sanc_org ///
		         econ_lgdppc econ_lgdp econ_fin econ_asset_gdp) replace  	
	
	
** Appx. 6. Pre-1996: Excluded / Sample: Full / IV: Dummy / OLS ****************

  * Preparatory Steps (1): Basic setup
    clear all
    program drop _all
    set more off
    set mem 600m

  * Preparatory Steps (2): Import data
	use "[Data] Pre-1996 Excluded.dta", replace	
	
  * Preparatory Steps (3): Declare panel 
    encode iso3, gen(iso3_num)
    xtset iso3_num year
	
  * Preparatory Steps (4): Run regression with minimum size sample
	reghdfe lerner sanc_fdur sanc_fpostdur sanc_nonfdur sanc_nonfpostdur ///
	     sanc_type sanc_state sanc_org ///
		 econ_change_gdp econ_fin econ_asset_gdp, ///
		 absorb(iso3_num year) vce(robust)
		 
  * Preparatory Steps (5): Specify the minimum size sample
    gen analysis_sample1 = e(sample)

  * Preparatory Steps (6): Restrict to minimum size sample
    keep if analysis_sample1	

  * Model (1)			
	reghdfe lerner sanc_dur_dummy ///
	     sanc_type sanc_state sanc_org, ///
		 absorb(iso3_num year) vce(robust)
	est store full_imposition_ols_1

  * Model (2)	
	reghdfe lerner sanc_dur_dummy ///
	     sanc_type sanc_state sanc_org ///
		 econ_change_gdp econ_fin econ_asset_gdp, ///
		 absorb(iso3_num year) vce(robust)
	est store full_imposition_ols_2
	
  * Model (3)		
	reghdfe lerner sanc_fdur_dummy sanc_nonfdur_dummy ///
	     sanc_type sanc_state sanc_org, ///
		 absorb(iso3_num year) vce(robust)	
    est store full_imposition_ols_3

  * Model (4)			
	reghdfe lerner sanc_fdur_dummy sanc_nonfdur_dummy ///
	     sanc_type sanc_state sanc_org ///
		 econ_change_gdp econ_fin econ_asset_gdp, ///
		 absorb(iso3_num year) vce(robust)
	est store full_imposition_ols_4 
	
  * Export regression table	
    esttab full_imposition_ols_1  full_imposition_ols_2  ///
           full_imposition_ols_3  full_imposition_ols_4 ///	
	       using "[Appendix 6] full_imposition_ols.rtf", ///
	       b(3) se(3) ///
	       scalars(r2_a) ///
		   star(* 0.1 ** 0.05 *** 0.01) ///		  
           nomtitles nobaselevels nogaps  ///
           varwidth(15) modelwidth(10) ///
		   order(sanc_dur_dummy  ///
		         sanc_fdur_dummy sanc_nonfdur_dummy ///
  	             sanc_type sanc_state sanc_org ///
		         econ_change_gdp econ_fin econ_asset_gdp) replace 			


** Appx. 7. Pre-1996: Excluded / Sample: Sanc. States / IV: Duration / Heckman *

  * Preparatory Steps (1): Basic setup
    clear all
    program drop _all
    set more off
    set mem 600m

  * Preparatory Steps (2): Import data
	use "[Data] Pre-1996 Excluded.dta", replace	
	
  * Preparatory Steps (3): Declare panel 
    encode iso3, gen(iso3_num)
    xtset iso3_num year
	
  * Preparatory Steps (4): Run regression with minimum size sample
	reghdfe lerner sanc_fdur sanc_fpostdur sanc_nonfdur sanc_nonfpostdur ///
	     sanc_type sanc_state sanc_org ///
		 econ_change_gdp econ_fin econ_asset_gdp, ///
		 absorb(iso3_num year) vce(robust)
		 
  * Preparatory Steps (5): Specify the minimum size sample
    gen analysis_sample1 = e(sample)

  * Preparatory Steps (6): Restrict to minimum size sample
    keep if analysis_sample1	
	
  * Preparatory Steps (7): Restrict sample to the countries that experienced sanctions
    egen exp_sanc = max(sanc_dur_dummy), by(iso3_num)
    keep if exp_sanc == 1

  * Model (1)	
    heckman lerner sanc_dur sanc_postdur ///
	     sanc_type sanc_state sanc_org i.iso3_num i.year, ///
         select(sanc_dur_dummy = l.sanc_dur_dummy pol_polity2dem /// 
		        econ_lgdppc econ_fdi_gdp econ_trade_gdp i.iso3_num i.year) vce(robust)  							
	est store sanc_dur_heckman_1 

  * Compute rho from athrho
    nlcom (rho: tanh(_b[/athrho]))
 
  * Extract from r(table)
    scalar rho_b  = r(table)[1,1]
    scalar rho_se = r(table)[2,1]
    scalar rho_p = r(table)[4,1] 
	
  * Restore stored model
    est restore sanc_dur_heckman_1

  * Add them to esttab scalars
    estadd scalar Rho = rho_b
    estadd scalar Rho_SE = rho_se
	estadd scalar Rho_p = rho_p
    estadd scalar WaldChi2 = e(chi2_c)
	estadd scalar Wald_p = e(p_c)

  * Model (2)	
    heckman lerner sanc_dur sanc_postdur ///
	     sanc_type sanc_state sanc_org ///
		 econ_change_gdp econ_fin econ_asset_gdp i.iso3_num i.year, ///
         select(sanc_dur_dummy = l.sanc_dur_dummy pol_polity2dem /// 
		        econ_lgdppc econ_fdi_gdp econ_trade_gdp i.iso3_num i.year) vce(robust) 
	est store sanc_dur_heckman_2

  * Compute rho from athrho
    nlcom (rho: tanh(_b[/athrho]))
 
  * Extract from r(table)
    scalar rho_b  = r(table)[1,1]
    scalar rho_se = r(table)[2,1]
    scalar rho_p = r(table)[4,1] 
	
  * Restore stored model
    est restore sanc_dur_heckman_2

  * Add them to esttab scalars
    estadd scalar Rho = rho_b
    estadd scalar Rho_SE = rho_se
	estadd scalar Rho_p = rho_p
    estadd scalar WaldChi2 = e(chi2_c)
	estadd scalar Wald_p = e(p_c)
	
  * Model (3)	
    heckman lerner sanc_fdur sanc_fpostdur sanc_nonfdur sanc_nonfpostdur ///
	     sanc_type sanc_state sanc_org i.iso3_num i.year, ///
         select(sanc_dur_dummy = l.sanc_dur_dummy pol_polity2dem /// 
		        econ_lgdppc econ_fdi_gdp econ_trade_gdp i.iso3_num i.year) vce(robust)  		
	est store sanc_dur_heckman_3

  * Compute rho from athrho
    nlcom (rho: tanh(_b[/athrho]))
 
  * Extract from r(table)
    scalar rho_b  = r(table)[1,1]
    scalar rho_se = r(table)[2,1]
    scalar rho_p = r(table)[4,1] 
	
  * Restore stored model
    est restore sanc_dur_heckman_3

  * Add them to esttab scalars
    estadd scalar Rho = rho_b
    estadd scalar Rho_SE = rho_se
	estadd scalar Rho_p = rho_p
    estadd scalar WaldChi2 = e(chi2_c)
	estadd scalar Wald_p = e(p_c)
	
  * Model (4)
    heckman lerner sanc_fdur sanc_fpostdur sanc_nonfdur sanc_nonfpostdur ///
	     sanc_type sanc_state sanc_org ///
		 econ_change_gdp econ_fin econ_asset_gdp i.iso3_num i.year, ///
         select(sanc_dur_dummy = l.sanc_dur_dummy pol_polity2dem /// 
		        econ_lgdppc econ_fdi_gdp econ_trade_gdp i.iso3_num i.year) vce(robust)      		 
	est store sanc_dur_heckman_4

  * Compute rho from athrho
    nlcom (rho: tanh(_b[/athrho]))
 
  * Extract from r(table)
    scalar rho_b  = r(table)[1,1]
    scalar rho_se = r(table)[2,1]
    scalar rho_p = r(table)[4,1] 
	
  * Restore stored model
    est restore sanc_dur_heckman_4

  * Add them to esttab scalars
    estadd scalar Rho = rho_b
    estadd scalar Rho_SE = rho_se
	estadd scalar Rho_p = rho_p
    estadd scalar WaldChi2 = e(chi2_c)
	estadd scalar Wald_p = e(p_c)
	
  * Export regression table		
    esttab sanc_dur_heckman_1 sanc_dur_heckman_2 ///
	       sanc_dur_heckman_3 sanc_dur_heckman_4 ///
	       using "[Appendix 7] sanc_dur_heckman.rtf", ///
	       b(3) se(3) ///
	       scalars(N N_selected Rho Rho_SE Rho_p WaldChi2 Wald_p ll) ///
		   star(* 0.1 ** 0.05 *** 0.01) ///		  
           nomtitles nobaselevels nogaps  ///
           varwidth(15) modelwidth(10) ///
		   order(sanc_dur sanc_postdur ///
		         sanc_fdur sanc_fpostdur ///
				 sanc_nonfdur sanc_nonfpostdur ///
  	             sanc_type sanc_state sanc_org ///
		         econ_change_gdp econ_fin econ_asset_gdp ///
				 L.sanc_dur_dummy ///				 
                 pol_polity2dem econ_lgdppc ///
				 econ_fdi_gdp econ_trade_gdp _cons ) ///
		   keep(sanc_dur sanc_postdur ///
		         sanc_fdur sanc_fpostdur ///
				 sanc_nonfdur sanc_nonfpostdur ///
  	             sanc_type sanc_state sanc_org ///
		         econ_change_gdp econ_fin econ_asset_gdp ///
				 L.sanc_dur_dummy ///				 
                 pol_polity2dem econ_lgdppc ///
				 econ_fdi_gdp econ_trade_gdp _cons ) ///
		         replace

	
** Appx. 8. Pre-1996: Excluded / Sample: 1-Year Lag / IV: Duration / OLS *******

  * Preparatory Steps (1): Basic setup
    clear all
    program drop _all
    set more off
    set mem 600m

  * Preparatory Steps (2): Import data
	use "[Data] Pre-1996 Excluded.dta", replace	
	
  * Preparatory Steps (3): Declare panel 
    encode iso3, gen(iso3_num)
    xtset iso3_num year
	
  * Preparatory Steps (4): Run regression with minimum size sample
	reghdfe lerner sanc_fdur sanc_fpostdur sanc_nonfdur sanc_nonfpostdur ///
	     sanc_type sanc_state sanc_org ///
		 econ_change_gdp econ_fin econ_asset_gdp, ///
		 absorb(iso3_num year) vce(robust)
		 
  * Preparatory Steps (5): Specify the minimum size sample
    gen analysis_sample1 = e(sample)

  * Preparatory Steps (6): Restrict to minimum size sample
    keep if analysis_sample1	

  * Model (1)			
	reghdfe lerner l.sanc_dur l.sanc_postdur ///
	     l.sanc_type l.sanc_state l.sanc_org, ///
		 absorb(iso3_num year) vce(robust)
	est store lag_dur_ols_1	
	
  * Model (2)			
	reghdfe lerner l.sanc_dur l.sanc_postdur ///
	     l.sanc_type l.sanc_state l.sanc_org ///
		 l.econ_change_gdp l.econ_fin l.econ_asset, ///
		 absorb(iso3_num year) vce(robust)
	est store lag_dur_ols_2	
	
  * Model (3)				
	reghdfe lerner l.sanc_fdur l.sanc_fpostdur ///
	     l.sanc_nonfdur l.sanc_nonfpostdur  ///
	     l.sanc_type l.sanc_state l.sanc_org, ///
		 absorb(iso3_num year) vce(robust)		
    est store lag_dur_ols_3 
	
  * Model (4)			
	reghdfe lerner l.sanc_fdur l.sanc_fpostdur ///
	     l.sanc_nonfdur l.sanc_nonfpostdur  ///
	     l.sanc_type l.sanc_state l.sanc_org ///
		 l.econ_change_gdp l.econ_fin l.econ_asset, ///
		 absorb(iso3_num year) vce(robust)		
    est store lag_dur_ols_4		
	
  * Export regression table		
    esttab lag_dur_ols_1  lag_dur_ols_2 ///
	       lag_dur_ols_3  lag_dur_ols_4 ///
	       using "[Appendix 8] lag_dur_ols.rtf", ///
	       b(3) se(3) ///
	       scalars(r2_a) ///
		   star(* 0.1 ** 0.05 *** 0.01) ///		  
           nomtitles nobaselevels nogaps  ///
           varwidth(15) modelwidth(10) ///
		   order(L.sanc_dur  L.sanc_postdur ///
		         L.sanc_fdur L.sanc_fpostdur ///
				 L.sanc_nonfdur L.sanc_nonfpostdur ///		   
  	             L.sanc_type L.sanc_state L.sanc_org ///
		         L.econ_change_gdp L.econ_fin L.econ_asset_gdp) replace 	


** Appx. 9. Pre-1996: Excluded / Sample: Diff: 5-7 Yr / IV: Duration / OLS *****

  * Preparatory Steps (1): Basic setup
    clear all
    program drop _all
    set more off
    set mem 600m

  * Preparatory Steps (2): Import data
	use "[Data] Pre-1996 Excluded.dta", replace	
	
  * Preparatory Steps (3): Declare panel 
    encode iso3, gen(iso3_num)
    xtset iso3_num year
	
  * Preparatory Steps (4): Run regression with minimum size sample
	reghdfe lerner sanc_fdur sanc_fpostdur sanc_nonfdur sanc_nonfpostdur ///
	     sanc_type sanc_state sanc_org ///
		 econ_change_gdp econ_fin econ_asset_gdp, ///
		 absorb(iso3_num year) vce(robust)
		 
  * Preparatory Steps (5): Specify the minimum size sample
    gen analysis_sample1 = e(sample)

  * Preparatory Steps (6): Restrict to minimum size sample
    keep if analysis_sample1	

  * Preparatory Steps (7): Generate IV & CV	
    rangestat (sum) sanc_dur_dummy sanc_postdur_dummy ///
                    sanc_fdur_dummy sanc_fpostdur_dummy ///
                    sanc_nonfdur_dummy sanc_nonfpostdur_dummy ///
					sanc_dur sanc_postdur ///
					sanc_fdur sanc_fpostdur ///
					sanc_nonfpostdur sanc_nonfdur ///
              (max) sanc_type sanc_state sanc_org econ_fin ///
              (mean) econ_change_gdp econ_asset_gdp, ///
              interval(year 0 4) by(iso3_num)	
	  
  * Preparatory Steps (8): Calculate difference (DV)	
    gen lerner_diff567 = (F5.lerner + F6.lerner + F7.lerner)/3 - lerner	

  * Model (1)
	reghdfe lerner_diff567 ///
	     sanc_dur_dummy_sum sanc_postdur_dummy_sum ///
		 sanc_type_max sanc_state_max sanc_org_max, ///
		 absorb(iso3_num year) vce(robust)		
	est store diff567_dur_ols_1
	
  * Model (2)	 
	reghdfe lerner_diff567 ///
	     sanc_dur_dummy_sum sanc_postdur_dummy_sum ///
		 sanc_type_max sanc_state_max sanc_org_max ///
		 econ_change_gdp_mean econ_fin_max econ_asset_gdp_mean, ///
		 absorb(iso3_num year) vce(robust)		
	est store diff567_dur_ols_2

  * Model (3)	 	
	reghdfe lerner_diff567 ///
	     sanc_fdur_dummy_sum sanc_fpostdur_dummy_sum ///
		 sanc_nonfdur_dummy_sum sanc_nonfpostdur_dummy_sum  ///
		 sanc_type_max sanc_state_max sanc_org_max, ///
		 absorb(iso3_num year) vce(robust)		
	est store diff567_dur_ols_3
	
  * Model (4)	 
	reghdfe lerner_diff567 ///
	     sanc_fdur_dummy_sum sanc_fpostdur_dummy_sum ///
		 sanc_nonfdur_dummy_sum sanc_nonfpostdur_dummy_sum  ///
		 sanc_type_max sanc_state_max sanc_org_max ///
		 econ_change_gdp_mean econ_fin_max econ_asset_gdp_mean, ///
		 absorb(iso3_num year) vce(robust)	
	est store diff567_dur_ols_4
	
  * Export regression table	
    esttab diff567_dur_ols_1 diff567_dur_ols_2 ///
	       diff567_dur_ols_3 diff567_dur_ols_4 ///
	       using "[Appendix 9] diff567_dur_ols.rtf", ///
	       b(3) se(3) ///
	       scalars(r2_a) ///
		   star(* 0.1 ** 0.05 *** 0.01) ///		  
           nomtitles nobaselevels nogaps  ///
           varwidth(15) modelwidth(10) ///
		   order(sanc_dur_dummy_sum sanc_postdur_dummy_sum ///
		         sanc_fdur_dummy_sum sanc_fpostdur_dummy_sum ///
		         sanc_nonfdur_dummy_sum sanc_nonfpostdur_dummy_sum  ///
		         sanc_type_max sanc_state_max sanc_org_max ///
		         econ_change_gdp_mean econ_fin_max econ_asset_gdp_mean _cons) ///
		   keep(sanc_dur_dummy_sum sanc_postdur_dummy_sum ///
		        sanc_fdur_dummy_sum sanc_fpostdur_dummy_sum ///
		        sanc_nonfdur_dummy_sum sanc_nonfpostdur_dummy_sum  ///
		        sanc_type_max sanc_state_max sanc_org_max ///
		        econ_change_gdp_mean econ_fin_max econ_asset_gdp_mean _cons) ///
		        replace 	
	

** Appx. 10. Pre-1996: Excluded / Sample: Diff: 6-8 Yr / IV: Duration / OLS ****

  * Preparatory Steps (1): Basic setup
    clear all
    program drop _all
    set more off
    set mem 600m

  * Preparatory Steps (2): Import data
	use "[Data] Pre-1996 Excluded.dta", replace	
	
  * Preparatory Steps (3): Declare panel 
    encode iso3, gen(iso3_num)
    xtset iso3_num year
	
  * Preparatory Steps (4): Run regression with minimum size sample
	reghdfe lerner sanc_fdur sanc_fpostdur sanc_nonfdur sanc_nonfpostdur ///
	     sanc_type sanc_state sanc_org ///
		 econ_change_gdp econ_fin econ_asset_gdp, ///
		 absorb(iso3_num year) vce(robust)
		 
  * Preparatory Steps (5): Specify the minimum size sample
    gen analysis_sample1 = e(sample)

  * Preparatory Steps (6): Restrict to minimum size sample
    keep if analysis_sample1	

  * Preparatory Steps (7): Generate IV & CV	
    rangestat (sum) sanc_dur_dummy sanc_postdur_dummy ///
                    sanc_fdur_dummy sanc_fpostdur_dummy ///
                    sanc_nonfdur_dummy sanc_nonfpostdur_dummy ///
					sanc_dur sanc_postdur ///
					sanc_fdur sanc_fpostdur ///
					sanc_nonfpostdur sanc_nonfdur ///
              (max) sanc_type sanc_state sanc_org econ_fin ///
              (mean) econ_change_gdp econ_asset_gdp, ///
              interval(year 0 5) by(iso3_num)	

  * Preparatory Steps (8): Calculate difference (DV)	
    gen lerner_diff678 = (F6.lerner + F7.lerner + F8.lerner)/3 - lerner

  * Model (1)
	reghdfe lerner_diff678 ///
	     sanc_dur_dummy_sum sanc_postdur_dummy_sum ///
		 sanc_type_max sanc_state_max sanc_org_max, ///
		 absorb(iso3_num year) vce(robust)		
	est store diff678_dur_ols_1
	
  * Model (2)	 
	reghdfe lerner_diff678 ///
	     sanc_dur_dummy_sum sanc_postdur_dummy_sum ///
		 sanc_type_max sanc_state_max sanc_org_max ///
		 econ_change_gdp_mean econ_fin_max econ_asset_gdp_mean, ///
		 absorb(iso3_num year) vce(robust)		
	est store diff678_dur_ols_2
	
  * Model (3)	 	
	reghdfe lerner_diff678 ///
	     sanc_fdur_dummy_sum sanc_fpostdur_dummy_sum ///
		 sanc_nonfdur_dummy_sum sanc_nonfpostdur_dummy_sum  ///
		 sanc_type_max sanc_state_max sanc_org_max, ///
		 absorb(iso3_num year) vce(robust)		
	est store diff678_dur_ols_3

  * Model (4)	 	
	reghdfe lerner_diff678 ///
	     sanc_fdur_dummy_sum sanc_fpostdur_dummy_sum ///
		 sanc_nonfdur_dummy_sum sanc_nonfpostdur_dummy_sum  ///
		 sanc_type_max sanc_state_max sanc_org_max ///
		 econ_change_gdp_mean econ_fin_max econ_asset_gdp_mean, ///
		 absorb(iso3_num year) vce(robust)	
	est store diff678_dur_ols_4
	
  * Export regression table	
    esttab diff678_dur_ols_1 diff678_dur_ols_2 ///
	       diff678_dur_ols_3 diff678_dur_ols_4 ///
	       using "[Appendix 10] diff678_dur_ols.rtf", ///
	       b(3) se(3) ///
	       scalars(r2_a) ///
		   star(* 0.1 ** 0.05 *** 0.01) ///		  
           nomtitles nobaselevels nogaps  ///
           varwidth(15) modelwidth(10) ///
		   order(sanc_dur_dummy_sum sanc_postdur_dummy_sum ///
		         sanc_fdur_dummy_sum sanc_fpostdur_dummy_sum ///
		         sanc_nonfdur_dummy_sum sanc_nonfpostdur_dummy_sum  ///
		         sanc_type_max sanc_state_max sanc_org_max ///
		         econ_change_gdp_mean econ_fin_max econ_asset_gdp_mean _cons) ///
		   keep(sanc_dur_dummy_sum sanc_postdur_dummy_sum ///
		        sanc_fdur_dummy_sum sanc_fpostdur_dummy_sum ///
		        sanc_nonfdur_dummy_sum sanc_nonfpostdur_dummy_sum  ///
		        sanc_type_max sanc_state_max sanc_org_max ///
		        econ_change_gdp_mean econ_fin_max econ_asset_gdp_mean _cons) ///
		        replace	

	
** Appx. 11. Pre-1996: Excluded / Sample: Diff: 7-9 Yr / IV: Duration / OLS ****

  * Preparatory Steps (1): Basic setup
    clear all
    program drop _all
    set more off
    set mem 600m

  * Preparatory Steps (2): Import data
	use "[Data] Pre-1996 Excluded.dta", replace	
	
  * Preparatory Steps (3): Declare panel 
    encode iso3, gen(iso3_num)
    xtset iso3_num year
	
  * Preparatory Steps (4): Run regression with minimum size sample
	reghdfe lerner sanc_fdur sanc_fpostdur sanc_nonfdur sanc_nonfpostdur ///
	     sanc_type sanc_state sanc_org ///
		 econ_change_gdp econ_fin econ_asset_gdp, ///
		 absorb(iso3_num year) vce(robust)
		 
  * Preparatory Steps (5): Specify the minimum size sample
    gen analysis_sample1 = e(sample)

  * Preparatory Steps (6): Restrict to minimum size sample
    keep if analysis_sample1	

  * Preparatory Steps (7): Generate IV & CV	
    rangestat (sum) sanc_dur_dummy sanc_postdur_dummy ///
                    sanc_fdur_dummy sanc_fpostdur_dummy ///
                    sanc_nonfdur_dummy sanc_nonfpostdur_dummy ///
					sanc_dur sanc_postdur ///
					sanc_fdur sanc_fpostdur ///
					sanc_nonfpostdur sanc_nonfdur ///
              (max) sanc_type sanc_state sanc_org econ_fin ///
              (mean) econ_change_gdp econ_asset_gdp, ///
              interval(year 0 6) by(iso3_num)	

  * Preparatory Steps (8): Calculate difference (DV)	
    gen lerner_diff789 = (F7.lerner + F8.lerner + F9.lerner)/3 - lerner	

  * Model (1)	
	reghdfe lerner_diff789 ///
	     sanc_dur_dummy_sum sanc_postdur_dummy_sum ///
		 sanc_type_max sanc_state_max sanc_org_max, ///
		 absorb(iso3_num year) vce(robust)		
	est store diff789_dur_ols_1

  * Model (2)	
	reghdfe lerner_diff789 ///
	     sanc_dur_dummy_sum sanc_postdur_dummy_sum ///
		 sanc_type_max sanc_state_max sanc_org_max ///
		 econ_change_gdp_mean econ_fin_max econ_asset_gdp_mean, ///
		 absorb(iso3_num year) vce(robust)		
	est store diff789_dur_ols_2
	
  * Model (3)	
	reghdfe lerner_diff789 ///
	     sanc_fdur_dummy_sum sanc_fpostdur_dummy_sum ///
		 sanc_nonfdur_dummy_sum sanc_nonfpostdur_dummy_sum  ///
		 sanc_type_max sanc_state_max sanc_org_max, ///
		 absorb(iso3_num year) vce(robust)		
	est store diff789_dur_ols_3
	
  * Model (4)
	reghdfe lerner_diff789 ///
	     sanc_fdur_dummy_sum sanc_fpostdur_dummy_sum ///
		 sanc_nonfdur_dummy_sum sanc_nonfpostdur_dummy_sum  ///
		 sanc_type_max sanc_state_max sanc_org_max ///
		 econ_change_gdp_mean econ_fin_max econ_asset_gdp_mean, ///
		 absorb(iso3_num year) vce(robust)	
	est store diff789_dur_ols_4
	
  * Export regression table	
    esttab diff789_dur_ols_1 diff789_dur_ols_2 ///
	       diff789_dur_ols_3 diff789_dur_ols_4 ///
	       using "[Appendix 11] diff789_dur_ols.rtf", ///
	       b(3) se(3) ///
	       scalars(r2_a) ///
		   star(* 0.1 ** 0.05 *** 0.01) ///		  
           nomtitles nobaselevels nogaps  ///
           varwidth(15) modelwidth(10) ///
		   order(sanc_dur_dummy_sum sanc_postdur_dummy_sum ///
		         sanc_fdur_dummy_sum sanc_fpostdur_dummy_sum ///
		         sanc_nonfdur_dummy_sum sanc_nonfpostdur_dummy_sum  ///
		         sanc_type_max sanc_state_max sanc_org_max ///
		         econ_change_gdp_mean econ_fin_max econ_asset_gdp_mean _cons) ///
		   keep(sanc_dur_dummy_sum sanc_postdur_dummy_sum ///
		        sanc_fdur_dummy_sum sanc_fpostdur_dummy_sum ///
		        sanc_nonfdur_dummy_sum sanc_nonfpostdur_dummy_sum  ///
		        sanc_type_max sanc_state_max sanc_org_max ///
		        econ_change_gdp_mean econ_fin_max econ_asset_gdp_mean _cons) ///
		        replace 	

	
** Appx. 12. Pre-1996: Included / Summary Statistics ***************************

  * Preparatory Steps (1): Basic setup
    clear all
    program drop _all
    set more off
    set mem 600m

  * Preparatory Steps (2): Import data
	use "[Data] Pre-1996 Included.dta", replace	
	
  * Preparatory Steps (3): Declare panel 
    encode iso3, gen(iso3_num)
    xtset iso3_num year
	
  * Preparatory Steps (4): Run regression with minimum size sample
	reghdfe lerner sanc_fdur sanc_fpostdur sanc_nonfdur sanc_nonfpostdur ///
	     sanc_type sanc_state sanc_org ///
		 econ_change_gdp econ_fin econ_asset_gdp, ///
		 absorb(iso3_num year) vce(robust)
		 
  * Preparatory Steps (5): Specify the minimum size sample
    gen analysis_sample1 = e(sample)

  * Preparatory Steps (6): Restrict to minimum size sample
    keep if analysis_sample1	

  *	Appx. 12. Summary Statistics
    asdoc sum lerner ///
	          sanc_dur sanc_postdur sanc_dur_dummy ///
			  sanc_fdur sanc_fpostdur sanc_fdur_dummy ///
			  sanc_nonfdur sanc_nonfpostdur sanc_nonfdur_dummy ///
			  sanc_type sanc_state sanc_org ///
			  econ_change_gdp econ_lgdppc econ_lgdp econ_fin econ_asset_gdp ///
			  pol_polity2dem  ///
			  econ_fdi_gdp econ_trade_gdp, ///
			  save([Appendix 12] Summary Statistics.doc) replace
			  

** Appx. 13. Pre-1996: Included / Sample: Full / IV: Duration / OLS ************

  * Preparatory Steps (1): Basic setup
    clear all
    program drop _all
    set more off
    set mem 600m

  * Preparatory Steps (2): Import data
	use "[Data] Pre-1996 Included.dta", replace	
	
  * Preparatory Steps (3): Declare panel 
    encode iso3, gen(iso3_num)
    xtset iso3_num year
	
  * Preparatory Steps (4): Run regression with minimum size sample
	reghdfe lerner sanc_fdur sanc_fpostdur sanc_nonfdur sanc_nonfpostdur ///
	     sanc_type sanc_state sanc_org ///
		 econ_change_gdp econ_fin econ_asset_gdp, ///
		 absorb(iso3_num year) vce(robust)
		 
  * Preparatory Steps (5): Specify the minimum size sample
    gen analysis_sample1 = e(sample)

  * Preparatory Steps (6): Restrict to minimum size sample
    keep if analysis_sample1	

  * Model (1)
	reghdfe lerner sanc_dur sanc_postdur ///
	     sanc_type sanc_state sanc_org, ///
		 absorb(iso3_num year) vce(robust)
	est store full_dur_ols_1
	
  * Model (2)
	reghdfe lerner sanc_dur sanc_postdur  ///
	     sanc_type sanc_state sanc_org ///
		 econ_change_gdp econ_fin econ_asset_gdp, ///
		 absorb(iso3_num year) vce(robust)
	est store full_dur_ols_2

  * Model (3)	
	reghdfe lerner sanc_fdur sanc_fpostdur sanc_nonfdur sanc_nonfpostdur ///
	     sanc_type sanc_state sanc_org, ///
		 absorb(iso3_num year) vce(robust)	
    est store full_dur_ols_3

  * Model (4)	
	reghdfe lerner sanc_fdur sanc_fpostdur sanc_nonfdur sanc_nonfpostdur ///
	     sanc_type sanc_state sanc_org ///
		 econ_change_gdp econ_fin econ_asset_gdp, ///
		 absorb(iso3_num year) vce(robust)
	est store full_dur_ols_4
	
  * Export regression table
    esttab full_dur_ols_1  full_dur_ols_2  ///
	       full_dur_ols_3  full_dur_ols_4  ///
	       using "[Appendix 13] full_dur_ols.rtf", ///
	       b(3) se(3) ///
	       scalars(r2_a) ///
		   star(* 0.1 ** 0.05 *** 0.01) ///		  
           nomtitles nobaselevels nogaps  ///
           varwidth(15) modelwidth(10) ///
		   order(sanc_dur sanc_postdur ///
		         sanc_fdur sanc_fpostdur ///
				 sanc_nonfdur sanc_nonfpostdur ///
  	             sanc_type sanc_state sanc_org ///
		         econ_change_gdp econ_fin econ_asset_gdp) replace 	
	
	
** Appx. 14. Pre-1996: Included / Sample: Full / IV: None / OLS ****************

  * Preparatory Steps (1): Basic setup
    clear all
    program drop _all
    set more off
    set mem 600m

  * Preparatory Steps (2): Import data
	use "[Data] Pre-1996 Included.dta", replace	
	
  * Preparatory Steps (3): Declare panel 
    encode iso3, gen(iso3_num)
    xtset iso3_num year
	
  * Preparatory Steps (4): Run regression with minimum size sample
	reghdfe lerner sanc_fdur sanc_fpostdur sanc_nonfdur sanc_nonfpostdur ///
	     sanc_type sanc_state sanc_org ///
		 econ_change_gdp econ_fin econ_asset_gdp, ///
		 absorb(iso3_num year) vce(robust)
		 
  * Preparatory Steps (5): Specify the minimum size sample
    gen analysis_sample1 = e(sample)

  * Preparatory Steps (6): Restrict to minimum size sample
    keep if analysis_sample1	
	
  * Model (1)
	reghdfe lerner ///
	     sanc_type sanc_state sanc_org, ///
		 absorb(iso3_num year) vce(robust)
	est store full_no_ols_1

  * Model (2)	
	reghdfe lerner ///
	     sanc_type sanc_state sanc_org ///
		 econ_change_gdp econ_fin econ_asset_gdp, ///
		 absorb(iso3_num year) vce(robust)
	est store full_no_ols_2
	
  * Model (3)		
	reghdfe lerner ///
	     sanc_type sanc_state sanc_org, ///
		 absorb(iso3_num year) vce(robust)	
    est store full_no_ols_3
	
  * Model (4)
	reghdfe lerner ///
	     sanc_type sanc_state sanc_org ///
		 econ_change_gdp econ_fin econ_asset_gdp, ///
		 absorb(iso3_num year) vce(robust)
	est store full_no_ols_4 
	
  * Export regression table
    esttab full_no_ols_1  full_no_ols_2  ///
	       full_no_ols_3  full_no_ols_4  ///
	       using "[Appendix 14] full_no_ols.rtf", ///
	       b(3) se(3) ///
	       scalars(r2_a) ///
		   star(* 0.1 ** 0.05 *** 0.01) ///		  
           nomtitles nobaselevels nogaps  ///
           varwidth(15) modelwidth(10) ///
		   order(sanc_type sanc_state sanc_org ///
		         econ_change_gdp econ_fin econ_asset_gdp) replace	
	

** Appx. 15. Pre-1996: Included / Sample: Full / IV: Duration / OLS ************

  * Preparatory Steps (1): Basic setup
    clear all
    program drop _all
    set more off
    set mem 600m

  * Preparatory Steps (2): Import data
	use "[Data] Pre-1996 Included.dta", replace	
	
  * Preparatory Steps (3): Declare panel 
    encode iso3, gen(iso3_num)
    xtset iso3_num year
	
  * Preparatory Steps (4): Run regression with minimum size sample
	reghdfe lerner sanc_fdur sanc_fpostdur sanc_nonfdur sanc_nonfpostdur ///
	     sanc_type sanc_state sanc_org ///
		 econ_change_gdp econ_fin econ_asset_gdp, ///
		 absorb(iso3_num year) vce(robust)
		 
  * Preparatory Steps (5): Specify the minimum size sample
    gen analysis_sample1 = e(sample)

  * Preparatory Steps (6): Restrict to minimum size sample
    keep if analysis_sample1	

  * Model (1)
	reghdfe lerner sanc_dur sanc_postdur  ///
	     sanc_type sanc_state sanc_org ///
		 econ_lgdppc econ_fin econ_asset_gdp, ///
		 absorb(iso3_num year) vce(robust)
	est store full_dur_ols_gdppc_1
	
  * Model (2)
	reghdfe lerner sanc_dur sanc_postdur  ///
	     sanc_type sanc_state sanc_org ///
		 econ_lgdp econ_fin econ_asset_gdp, ///
		 absorb(iso3_num year) vce(robust)
	est store full_dur_ols_lgdp_1	
	
  * Model (3)	
	reghdfe lerner sanc_fdur sanc_fpostdur sanc_nonfdur sanc_nonfpostdur ///
	     sanc_type sanc_state sanc_org ///
		 econ_lgdppc econ_fin econ_asset_gdp, ///
		 absorb(iso3_num year) vce(robust)
	est store full_dur_ols_gdppc_2
	
  * Model (4)
	reghdfe lerner sanc_fdur sanc_fpostdur sanc_nonfdur sanc_nonfpostdur ///
	     sanc_type sanc_state sanc_org ///
		 econ_lgdp econ_fin econ_asset_gdp, ///
		 absorb(iso3_num year) vce(robust)
	est store full_dur_ols_lgdp_2
	
  * Export regression table
    esttab full_dur_ols_gdppc_1 full_dur_ols_lgdp_1  ///
	       full_dur_ols_gdppc_2 full_dur_ols_lgdp_2 ///
	       using "[Appendix 15] full_dur_ols_gdppc_lgdp.rtf", ///
	       b(3) se(3) ///
	       scalars(r2_a) ///
		   star(* 0.1 ** 0.05 *** 0.01) ///		  
           nomtitles nobaselevels nogaps  ///
           varwidth(15) modelwidth(10) ///
		   order(sanc_dur sanc_postdur ///
		         sanc_fdur sanc_fpostdur ///
				 sanc_nonfdur sanc_nonfpostdur ///
  	             sanc_type sanc_state sanc_org ///
		         econ_lgdppc econ_lgdp econ_fin econ_asset_gdp) replace  	
	
	
** Appx. 16. Pre-1996: Included / Sample: Full / IV: Dummy / OLS ***************

  * Preparatory Steps (1): Basic setup
    clear all
    program drop _all
    set more off
    set mem 600m

  * Preparatory Steps (2): Import data
	use "[Data] Pre-1996 Included.dta", replace	
	
  * Preparatory Steps (3): Declare panel 
    encode iso3, gen(iso3_num)
    xtset iso3_num year
	
  * Preparatory Steps (4): Run regression with minimum size sample
	reghdfe lerner sanc_fdur sanc_fpostdur sanc_nonfdur sanc_nonfpostdur ///
	     sanc_type sanc_state sanc_org ///
		 econ_change_gdp econ_fin econ_asset_gdp, ///
		 absorb(iso3_num year) vce(robust)
		 
  * Preparatory Steps (5): Specify the minimum size sample
    gen analysis_sample1 = e(sample)

  * Preparatory Steps (6): Restrict to minimum size sample
    keep if analysis_sample1	

  * Model (1)			
	reghdfe lerner sanc_dur_dummy ///
	     sanc_type sanc_state sanc_org, ///
		 absorb(iso3_num year) vce(robust)
	est store full_imposition_ols_1
	
  * Model (2)	
	reghdfe lerner sanc_dur_dummy ///
	     sanc_type sanc_state sanc_org ///
		 econ_change_gdp econ_fin econ_asset_gdp, ///
		 absorb(iso3_num year) vce(robust)
	est store full_imposition_ols_2
	
  * Model (3)		
	reghdfe lerner sanc_fdur_dummy sanc_nonfdur_dummy ///
	     sanc_type sanc_state sanc_org, ///
		 absorb(iso3_num year) vce(robust)	
    est store full_imposition_ols_3
	
  * Model (4)
	reghdfe lerner sanc_fdur_dummy sanc_nonfdur_dummy ///
	     sanc_type sanc_state sanc_org ///
		 econ_change_gdp econ_fin econ_asset_gdp, ///
		 absorb(iso3_num year) vce(robust)
	est store full_imposition_ols_4 

  * Export regression table	
    esttab full_imposition_ols_1  full_imposition_ols_2  ///
           full_imposition_ols_3  full_imposition_ols_4 ///	
	       using "[Appendix 16] full_imposition_ols.rtf", ///
	       b(3) se(3) ///
	       scalars(r2_a) ///
		   star(* 0.1 ** 0.05 *** 0.01) ///		  
           nomtitles nobaselevels nogaps  ///
           varwidth(15) modelwidth(10) ///
		   order(sanc_dur_dummy  ///
		         sanc_fdur_dummy sanc_nonfdur_dummy ///
  	             sanc_type sanc_state sanc_org ///
		         econ_change_gdp econ_fin econ_asset_gdp) replace 		
	
	
** Appx. 17. Pre-1996: Included / Sample: Sanc. States / IV: Duration / Heckman 

  * Preparatory Steps (1): Basic setup
    clear all
    program drop _all
    set more off
    set mem 600m

  * Preparatory Steps (2): Import data
	use "[Data] Pre-1996 Included.dta", replace	
	
  * Preparatory Steps (3): Declare panel 
    encode iso3, gen(iso3_num)
    xtset iso3_num year
	
  * Preparatory Steps (4): Run regression with minimum size sample
	reghdfe lerner sanc_fdur sanc_fpostdur sanc_nonfdur sanc_nonfpostdur ///
	     sanc_type sanc_state sanc_org ///
		 econ_change_gdp econ_fin econ_asset_gdp, ///
		 absorb(iso3_num year) vce(robust)
		 
  * Preparatory Steps (5): Specify the minimum size sample
    gen analysis_sample1 = e(sample)

  * Preparatory Steps (6): Restrict to minimum size sample
    keep if analysis_sample1	

  * Preparatory Steps (7): Restrict sample to the countries that experienced sanctions
    egen exp_sanc = max(sanc_dur_dummy), by(iso3_num)
    keep if exp_sanc == 1	
	
  * Model (1)
    heckman lerner sanc_dur sanc_postdur ///
	     sanc_type sanc_state sanc_org i.iso3_num i.year, ///
         select(sanc_dur_dummy = l.sanc_dur_dummy pol_polity2dem /// 
		        econ_lgdppc econ_fdi_gdp econ_trade_gdp i.iso3_num i.year) vce(robust)  							
	est store sanc_dur_heckman_1 

  * Compute rho from athrho
    nlcom (rho: tanh(_b[/athrho]))
 
  * Extract from r(table)
    scalar rho_b  = r(table)[1,1]
    scalar rho_se = r(table)[2,1]
    scalar rho_p = r(table)[4,1] 
	
  * Restore stored model
    est restore sanc_dur_heckman_1

  * Add them to esttab scalars
    estadd scalar Rho = rho_b
    estadd scalar Rho_SE = rho_se
	estadd scalar Rho_p = rho_p
    estadd scalar WaldChi2 = e(chi2_c)
	estadd scalar Wald_p = e(p_c)
	
  * Model (2)	
    heckman lerner sanc_dur sanc_postdur ///
	     sanc_type sanc_state sanc_org ///
		 econ_change_gdp econ_fin econ_asset_gdp i.iso3_num i.year, ///
         select(sanc_dur_dummy = l.sanc_dur_dummy pol_polity2dem /// 
		        econ_lgdppc econ_fdi_gdp econ_trade_gdp i.iso3_num i.year) vce(robust) 
	est store sanc_dur_heckman_2

  * Compute rho from athrho
    nlcom (rho: tanh(_b[/athrho]))
 
  * Extract from r(table)
    scalar rho_b  = r(table)[1,1]
    scalar rho_se = r(table)[2,1]
    scalar rho_p = r(table)[4,1] 
	
  * Restore stored model
    est restore sanc_dur_heckman_2

  * Add them to esttab scalars
    estadd scalar Rho = rho_b
    estadd scalar Rho_SE = rho_se
	estadd scalar Rho_p = rho_p
    estadd scalar WaldChi2 = e(chi2_c)
	estadd scalar Wald_p = e(p_c)
	
  * Model (3)	
    heckman lerner sanc_fdur sanc_fpostdur sanc_nonfdur sanc_nonfpostdur ///
	     sanc_type sanc_state sanc_org i.iso3_num i.year, ///
         select(sanc_dur_dummy = l.sanc_dur_dummy pol_polity2dem /// 
		        econ_lgdppc econ_fdi_gdp econ_trade_gdp i.iso3_num i.year) vce(robust)  		
	est store sanc_dur_heckman_3

  * Compute rho from athrho
    nlcom (rho: tanh(_b[/athrho]))
 
  * Extract from r(table)
    scalar rho_b  = r(table)[1,1]
    scalar rho_se = r(table)[2,1]
    scalar rho_p = r(table)[4,1] 
	
  * Restore stored model
    est restore sanc_dur_heckman_3

  * Add them to esttab scalars
    estadd scalar Rho = rho_b
    estadd scalar Rho_SE = rho_se
	estadd scalar Rho_p = rho_p
    estadd scalar WaldChi2 = e(chi2_c)
	estadd scalar Wald_p = e(p_c)
	
  * Model (4)	
    heckman lerner sanc_fdur sanc_fpostdur sanc_nonfdur sanc_nonfpostdur ///
	     sanc_type sanc_state sanc_org ///
		 econ_change_gdp econ_fin econ_asset_gdp i.iso3_num i.year, ///
         select(sanc_dur_dummy = l.sanc_dur_dummy pol_polity2dem /// 
		        econ_lgdppc econ_fdi_gdp econ_trade_gdp i.iso3_num i.year) vce(robust)      		 
	est store sanc_dur_heckman_4

  * Compute rho from athrho
    nlcom (rho: tanh(_b[/athrho]))
 
  * Extract from r(table)
    scalar rho_b  = r(table)[1,1]
    scalar rho_se = r(table)[2,1]
    scalar rho_p = r(table)[4,1] 
	
  * Restore stored model
    est restore sanc_dur_heckman_4

  * Add them to esttab scalars
    estadd scalar Rho = rho_b
    estadd scalar Rho_SE = rho_se
	estadd scalar Rho_p = rho_p
    estadd scalar WaldChi2 = e(chi2_c)
	estadd scalar Wald_p = e(p_c)
	
  * Export regression table		
    esttab sanc_dur_heckman_1 sanc_dur_heckman_2 ///
	       sanc_dur_heckman_3 sanc_dur_heckman_4 ///
	       using "[Appendix 17] sanc_dur_heckman.rtf", ///
	       b(3) se(3) ///
	       scalars(N N_selected Rho Rho_SE Rho_p WaldChi2 Wald_p ll) ///
		   star(* 0.1 ** 0.05 *** 0.01) ///		  
           nomtitles nobaselevels nogaps  ///
           varwidth(15) modelwidth(10) ///
		   order(sanc_dur sanc_postdur ///
		         sanc_fdur sanc_fpostdur ///
				 sanc_nonfdur sanc_nonfpostdur ///
  	             sanc_type sanc_state sanc_org ///
		         econ_change_gdp econ_fin econ_asset_gdp ///
				 L.sanc_dur_dummy ///				 
                 pol_polity2dem econ_lgdppc ///
				 econ_fdi_gdp econ_trade_gdp _cons ) ///
		   keep(sanc_dur sanc_postdur ///
		         sanc_fdur sanc_fpostdur ///
				 sanc_nonfdur sanc_nonfpostdur ///
  	             sanc_type sanc_state sanc_org ///
		         econ_change_gdp econ_fin econ_asset_gdp ///
				 L.sanc_dur_dummy ///				 
                  pol_polity2dem econ_lgdppc ///
				 econ_fdi_gdp econ_trade_gdp _cons ) ///
		         replace 	

	
** Appx. 18. Pre-1996: Included / Sample: 1-Year Lag / IV: Duration / OLS ******

  * Preparatory Steps (1): Basic setup
    clear all
    program drop _all
    set more off
    set mem 600m

  * Preparatory Steps (2): Import data
	use "[Data] Pre-1996 Included.dta", replace	
	
  * Preparatory Steps (3): Declare panel 
    encode iso3, gen(iso3_num)
    xtset iso3_num year
	
  * Preparatory Steps (4): Run regression with minimum size sample
	reghdfe lerner sanc_fdur sanc_fpostdur sanc_nonfdur sanc_nonfpostdur ///
	     sanc_type sanc_state sanc_org ///
		 econ_change_gdp econ_fin econ_asset_gdp, ///
		 absorb(iso3_num year) vce(robust)
		 
  * Preparatory Steps (5): Specify the minimum size sample
    gen analysis_sample1 = e(sample)

  * Preparatory Steps (6): Restrict to minimum size sample
    keep if analysis_sample1	

  * Model (1)	
	reghdfe lerner l.sanc_dur l.sanc_postdur ///
	     l.sanc_type l.sanc_state l.sanc_org, ///
		 absorb(iso3_num year) vce(robust)
	est store lag_dur_ols_1	

  * Model (2)	
	reghdfe lerner l.sanc_dur l.sanc_postdur ///
	     l.sanc_type l.sanc_state l.sanc_org ///
		 l.econ_change_gdp l.econ_fin l.econ_asset, ///
		 absorb(iso3_num year) vce(robust)
	est store lag_dur_ols_2	
	
  * Model (3)	
	reghdfe lerner l.sanc_fdur l.sanc_fpostdur ///
	     l.sanc_nonfdur l.sanc_nonfpostdur  ///
	     l.sanc_type l.sanc_state l.sanc_org, ///
		 absorb(iso3_num year) vce(robust)		
    est store lag_dur_ols_3 
	
  * Model (4)
	reghdfe lerner l.sanc_fdur l.sanc_fpostdur ///
	     l.sanc_nonfdur l.sanc_nonfpostdur  ///
	     l.sanc_type l.sanc_state l.sanc_org ///
		 l.econ_change_gdp l.econ_fin l.econ_asset, ///
		 absorb(iso3_num year) vce(robust)		
    est store lag_dur_ols_4		
	
  * Export regression table			
    esttab lag_dur_ols_1  lag_dur_ols_2 ///
	       lag_dur_ols_3  lag_dur_ols_4 ///
	       using "[Appendix 18] lag_dur_ols.rtf", ///
	       b(3) se(3) ///
	       scalars(r2_a) ///
		   star(* 0.1 ** 0.05 *** 0.01) ///		  
           nomtitles nobaselevels nogaps  ///
           varwidth(15) modelwidth(10) ///
		   order(L.sanc_dur  L.sanc_postdur ///
		         L.sanc_fdur L.sanc_fpostdur ///
				 L.sanc_nonfdur L.sanc_nonfpostdur ///		   
  	             L.sanc_type L.sanc_state L.sanc_org ///
		         L.econ_change_gdp L.econ_fin L.econ_asset_gdp) replace 		

	
** Appx. 19. Pre-1996: Included / Sample: Diff: 5-7 Yr / IV: Duration / OLS ****

  * Preparatory Steps (1): Basic setup
    clear all
    program drop _all
    set more off
    set mem 600m

  * Preparatory Steps (2): Import data
	use "[Data] Pre-1996 Included.dta", replace	
	
  * Preparatory Steps (3): Declare panel 
    encode iso3, gen(iso3_num)
    xtset iso3_num year
	
  * Preparatory Steps (4): Run regression with minimum size sample
	reghdfe lerner sanc_fdur sanc_fpostdur sanc_nonfdur sanc_nonfpostdur ///
	     sanc_type sanc_state sanc_org ///
		 econ_change_gdp econ_fin econ_asset_gdp, ///
		 absorb(iso3_num year) vce(robust)
		 
  * Preparatory Steps (5): Specify the minimum size sample
    gen analysis_sample1 = e(sample)

  * Preparatory Steps (6): Restrict to minimum size sample
    keep if analysis_sample1	

  * Preparatory Steps (7): Generate IV & CV	
    rangestat (sum) sanc_dur_dummy sanc_postdur_dummy ///
                    sanc_fdur_dummy sanc_fpostdur_dummy ///
                    sanc_nonfdur_dummy sanc_nonfpostdur_dummy ///
					sanc_dur sanc_postdur ///
					sanc_fdur sanc_fpostdur ///
					sanc_nonfpostdur sanc_nonfdur ///
              (max) sanc_type sanc_state sanc_org econ_fin ///
              (mean) econ_change_gdp econ_asset_gdp, ///
              interval(year 0 4) by(iso3_num)	
	  
  * Preparatory Steps (8): Calculate difference (DV)	
    gen lerner_diff567 = (F5.lerner + F6.lerner + F7.lerner)/3 - lerner	
	
  * Model (1)
	reghdfe lerner_diff567 ///
	     sanc_dur_dummy_sum sanc_postdur_dummy_sum ///
		 sanc_type_max sanc_state_max sanc_org_max, ///
		 absorb(iso3_num year) vce(robust)		
	est store diff567_dur_ols_1
	
  * Model (2)	 
	reghdfe lerner_diff567 ///
	     sanc_dur_dummy_sum sanc_postdur_dummy_sum ///
		 sanc_type_max sanc_state_max sanc_org_max ///
		 econ_change_gdp_mean econ_fin_max econ_asset_gdp_mean, ///
		 absorb(iso3_num year) vce(robust)		
	est store diff567_dur_ols_2
	
  * Model (3)	
	reghdfe lerner_diff567 ///
	     sanc_fdur_dummy_sum sanc_fpostdur_dummy_sum ///
		 sanc_nonfdur_dummy_sum sanc_nonfpostdur_dummy_sum  ///
		 sanc_type_max sanc_state_max sanc_org_max, ///
		 absorb(iso3_num year) vce(robust)		
	est store diff567_dur_ols_3

  * Model (4)	
	reghdfe lerner_diff567 ///
	     sanc_fdur_dummy_sum sanc_fpostdur_dummy_sum ///
		 sanc_nonfdur_dummy_sum sanc_nonfpostdur_dummy_sum  ///
		 sanc_type_max sanc_state_max sanc_org_max ///
		 econ_change_gdp_mean econ_fin_max econ_asset_gdp_mean, ///
		 absorb(iso3_num year) vce(robust)	
	est store diff567_dur_ols_4

  * Export regression table			
    esttab diff567_dur_ols_1 diff567_dur_ols_2 ///
	       diff567_dur_ols_3 diff567_dur_ols_4 ///
	       using "[Appendix 19] diff567_dur_ols.rtf", ///
	       b(3) se(3) ///
	       scalars(r2_a) ///
		   star(* 0.1 ** 0.05 *** 0.01) ///		  
           nomtitles nobaselevels nogaps  ///
           varwidth(15) modelwidth(10) ///
		   order(sanc_dur_dummy_sum sanc_postdur_dummy_sum ///
		         sanc_fdur_dummy_sum sanc_fpostdur_dummy_sum ///
		         sanc_nonfdur_dummy_sum sanc_nonfpostdur_dummy_sum  ///
		         sanc_type_max sanc_state_max sanc_org_max ///
		         econ_change_gdp_mean econ_fin_max econ_asset_gdp_mean _cons) ///
		   keep(sanc_dur_dummy_sum sanc_postdur_dummy_sum ///
		        sanc_fdur_dummy_sum sanc_fpostdur_dummy_sum ///
		        sanc_nonfdur_dummy_sum sanc_nonfpostdur_dummy_sum  ///
		        sanc_type_max sanc_state_max sanc_org_max ///
		        econ_change_gdp_mean econ_fin_max econ_asset_gdp_mean _cons) ///
		        replace 		
	
	
** Appx. 20. Pre-1996: Included / Sample: Diff: 6-8 Yr / IV: Duration / OLS ****

  * Preparatory Steps (1): Basic setup
    clear all
    program drop _all
    set more off
    set mem 600m

  * Preparatory Steps (2): Import data
	use "[Data] Pre-1996 Included.dta", replace	
	
  * Preparatory Steps (3): Declare panel 
    encode iso3, gen(iso3_num)
    xtset iso3_num year
	
  * Preparatory Steps (4): Run regression with minimum size sample
	reghdfe lerner sanc_fdur sanc_fpostdur sanc_nonfdur sanc_nonfpostdur ///
	     sanc_type sanc_state sanc_org ///
		 econ_change_gdp econ_fin econ_asset_gdp, ///
		 absorb(iso3_num year) vce(robust)
		 
  * Preparatory Steps (5): Specify the minimum size sample
    gen analysis_sample1 = e(sample)

  * Preparatory Steps (6): Restrict to minimum size sample
    keep if analysis_sample1	

  * Preparatory Steps (7): Generate IV & CV	
    rangestat (sum) sanc_dur_dummy sanc_postdur_dummy ///
                    sanc_fdur_dummy sanc_fpostdur_dummy ///
                    sanc_nonfdur_dummy sanc_nonfpostdur_dummy ///
					sanc_dur sanc_postdur ///
					sanc_fdur sanc_fpostdur ///
					sanc_nonfpostdur sanc_nonfdur ///
              (max) sanc_type sanc_state sanc_org econ_fin ///
              (mean) econ_change_gdp econ_asset_gdp, ///
              interval(year 0 5) by(iso3_num)	

  * Preparatory Steps (8): Calculate difference (DV)	
    gen lerner_diff678 = (F6.lerner + F7.lerner + F8.lerner)/3 - lerner
	
  * Model (1)	
	reghdfe lerner_diff678 ///
	     sanc_dur_dummy_sum sanc_postdur_dummy_sum ///
		 sanc_type_max sanc_state_max sanc_org_max, ///
		 absorb(iso3_num year) vce(robust)		
	est store diff678_dur_ols_1
	
  * Model (2)	 
	reghdfe lerner_diff678 ///
	     sanc_dur_dummy_sum sanc_postdur_dummy_sum ///
		 sanc_type_max sanc_state_max sanc_org_max ///
		 econ_change_gdp_mean econ_fin_max econ_asset_gdp_mean, ///
		 absorb(iso3_num year) vce(robust)		
	est store diff678_dur_ols_2
	
  * Model (3)	
	reghdfe lerner_diff678 ///
	     sanc_fdur_dummy_sum sanc_fpostdur_dummy_sum ///
		 sanc_nonfdur_dummy_sum sanc_nonfpostdur_dummy_sum  ///
		 sanc_type_max sanc_state_max sanc_org_max, ///
		 absorb(iso3_num year) vce(robust)		
	est store diff678_dur_ols_3

  * Model (4)	
	reghdfe lerner_diff678 ///
	     sanc_fdur_dummy_sum sanc_fpostdur_dummy_sum ///
		 sanc_nonfdur_dummy_sum sanc_nonfpostdur_dummy_sum  ///
		 sanc_type_max sanc_state_max sanc_org_max ///
		 econ_change_gdp_mean econ_fin_max econ_asset_gdp_mean, ///
		 absorb(iso3_num year) vce(robust)	
	est store diff678_dur_ols_4

  * Export regression table			
    esttab diff678_dur_ols_1 diff678_dur_ols_2 ///
	       diff678_dur_ols_3 diff678_dur_ols_4 ///
	       using "[Appendix 20] diff678_dur_ols.rtf", ///
	       b(3) se(3) ///
	       scalars(r2_a) ///
		   star(* 0.1 ** 0.05 *** 0.01) ///		  
           nomtitles nobaselevels nogaps  ///
           varwidth(15) modelwidth(10) ///
		   order(sanc_dur_dummy_sum sanc_postdur_dummy_sum ///
		         sanc_fdur_dummy_sum sanc_fpostdur_dummy_sum ///
		         sanc_nonfdur_dummy_sum sanc_nonfpostdur_dummy_sum  ///
		         sanc_type_max sanc_state_max sanc_org_max ///
		         econ_change_gdp_mean econ_fin_max econ_asset_gdp_mean _cons) ///
		   keep(sanc_dur_dummy_sum sanc_postdur_dummy_sum ///
		        sanc_fdur_dummy_sum sanc_fpostdur_dummy_sum ///
		        sanc_nonfdur_dummy_sum sanc_nonfpostdur_dummy_sum  ///
		        sanc_type_max sanc_state_max sanc_org_max ///
		        econ_change_gdp_mean econ_fin_max econ_asset_gdp_mean _cons) ///
		        replace 		
	
	
** Appx. 21. Pre-1996: Included / Sample: Diff: 7-9 Yr / IV: Duration / OLS ****


  * Preparatory Steps (1): Basic setup
    clear all
    program drop _all
    set more off
    set mem 600m

  * Preparatory Steps (2): Import data
	use "[Data] Pre-1996 Included.dta", replace	
	
  * Preparatory Steps (3): Declare panel 
    encode iso3, gen(iso3_num)
    xtset iso3_num year
	
  * Preparatory Steps (4): Run regression with minimum size sample
	reghdfe lerner sanc_fdur sanc_fpostdur sanc_nonfdur sanc_nonfpostdur ///
	     sanc_type sanc_state sanc_org ///
		 econ_change_gdp econ_fin econ_asset_gdp, ///
		 absorb(iso3_num year) vce(robust)
		 
  * Preparatory Steps (5): Specify the minimum size sample
    gen analysis_sample1 = e(sample)

  * Preparatory Steps (6): Restrict to minimum size sample
    keep if analysis_sample1	

  * Preparatory Steps (7): Generate IV & CV	
    rangestat (sum) sanc_dur_dummy sanc_postdur_dummy ///
                    sanc_fdur_dummy sanc_fpostdur_dummy ///
                    sanc_nonfdur_dummy sanc_nonfpostdur_dummy ///
					sanc_dur sanc_postdur ///
					sanc_fdur sanc_fpostdur ///
					sanc_nonfpostdur sanc_nonfdur ///
              (max) sanc_type sanc_state sanc_org econ_fin ///
              (mean) econ_change_gdp econ_asset_gdp, ///
              interval(year 0 6) by(iso3_num)	

  * Preparatory Steps (8): Calculate difference (DV)	
    gen lerner_diff789 = (F7.lerner + F8.lerner + F9.lerner)/3 - lerner

  * Model (1)	
	reghdfe lerner_diff789 ///
	     sanc_dur_dummy_sum sanc_postdur_dummy_sum ///
		 sanc_type_max sanc_state_max sanc_org_max, ///
		 absorb(iso3_num year) vce(robust)		
	est store diff789_dur_ols_1
	
  * Model (2)	 
	reghdfe lerner_diff789 ///
	     sanc_dur_dummy_sum sanc_postdur_dummy_sum ///
		 sanc_type_max sanc_state_max sanc_org_max ///
		 econ_change_gdp_mean econ_fin_max econ_asset_gdp_mean, ///
		 absorb(iso3_num year) vce(robust)		
	est store diff789_dur_ols_2
	
  * Model (3)	
	reghdfe lerner_diff789 ///
	     sanc_fdur_dummy_sum sanc_fpostdur_dummy_sum ///
		 sanc_nonfdur_dummy_sum sanc_nonfpostdur_dummy_sum  ///
		 sanc_type_max sanc_state_max sanc_org_max, ///
		 absorb(iso3_num year) vce(robust)		
	est store diff789_dur_ols_3
	
  * Model (4)
	reghdfe lerner_diff789 ///
	     sanc_fdur_dummy_sum sanc_fpostdur_dummy_sum ///
		 sanc_nonfdur_dummy_sum sanc_nonfpostdur_dummy_sum  ///
		 sanc_type_max sanc_state_max sanc_org_max ///
		 econ_change_gdp_mean econ_fin_max econ_asset_gdp_mean, ///
		 absorb(iso3_num year) vce(robust)	
	est store diff789_dur_ols_4
	
  * Export regression table		
    esttab diff789_dur_ols_1 diff789_dur_ols_2 ///
	       diff789_dur_ols_3 diff789_dur_ols_4 ///
	       using "[Appendix 21] diff789_dur_ols.rtf", ///
	       b(3) se(3) ///
	       scalars(r2_a) ///
		   star(* 0.1 ** 0.05 *** 0.01) ///		  
           nomtitles nobaselevels nogaps  ///
           varwidth(15) modelwidth(10) ///
		   order(sanc_dur_dummy_sum sanc_postdur_dummy_sum ///
		         sanc_fdur_dummy_sum sanc_fpostdur_dummy_sum ///
		         sanc_nonfdur_dummy_sum sanc_nonfpostdur_dummy_sum  ///
		         sanc_type_max sanc_state_max sanc_org_max ///
		         econ_change_gdp_mean econ_fin_max econ_asset_gdp_mean _cons) ///
		   keep(sanc_dur_dummy_sum sanc_postdur_dummy_sum ///
		        sanc_fdur_dummy_sum sanc_fpostdur_dummy_sum ///
		        sanc_nonfdur_dummy_sum sanc_nonfpostdur_dummy_sum  ///
		        sanc_type_max sanc_state_max sanc_org_max ///
		        econ_change_gdp_mean econ_fin_max econ_asset_gdp_mean _cons) ///
		        replace 		
	